/**
 * 
 */
package org.vsg.stock.core.persistence.mybatis;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Vector;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.dao.DataAccessException;
import org.vsg.stock.core.domain.StockInfo;
import org.vsg.stock.core.persistence.StockInfoDao;

/**
 * @author Bill Vison
 *
 */
public class StockInfoDaoImpl extends SqlSessionDaoSupport implements StockInfoDao {

	@Override
	public void save(Object entity) throws DataAccessException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void update(Object eneity) throws DataAccessException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Object load(Class cls, Serializable pk) throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void delete(Object entity) throws DataAccessException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void saveAll(Collection<StockInfo> entities)
			throws DataAccessException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean checkIdExist(String stockCode) throws DataAccessException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public List<StockInfo> findAllInfo() throws DataAccessException {
		
		List all = this.getSqlSessionTemplate().selectList("org.vsg.stock.core.domain.mybatis.StockInfoProxy.findAll");

		return (List<StockInfo>)all;
	}

	@Override
	public List<StockInfo> findAllGroupingInfo()
			throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<StockInfo> findAllRealInfo() throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<String> findAllName() throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<String> findAllCode() throws DataAccessException {
		// TODO Auto-generated method stub
		List all = this.getSqlSessionTemplate().selectList("org.vsg.stock.core.domain.mybatis.StockInfoProxy.findAllCode");

		return (List<String>)all;
	}

	@Override
	public List<String> findAllGroupingCode() throws DataAccessException {
		List all = this.getSqlSessionTemplate().selectList("org.vsg.stock.core.domain.mybatis.StockInfoProxy.findGroupingAllCode");
		return (List<String>)all;
	}

	@Override
	public List<String> findAllRealCode() throws DataAccessException {
		List all = this.getSqlSessionTemplate().selectList("org.vsg.stock.core.domain.mybatis.StockInfoProxy.findRealAllCode");
		return (List<String>)all;
	}

	@Override
	public List<String> fineStockCodeByCategoryDescription(String categoryName)
			throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void updateStockInfoPartMap(String groupingStkCode,
			List<String> realStkCodeList) throws DataAccessException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public int totalACapital(String market) throws DataAccessException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int totalGroupingACatital(String groupStockInfoCode)
			throws DataAccessException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void cleanAll() throws DataAccessException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void cleanInfoPartMap() throws DataAccessException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<String> findStockPartMapKey() throws DataAccessException {
		// TODO Auto-generated method stub
		List<String> stockMapKeyList = new Vector<String>();
		
		stockMapKeyList = this.getSqlSessionTemplate().selectList("org.vsg.stock.core.domain.mybatis.StockInfoProxy.findAllPartMapKeys");

		return stockMapKeyList;
	}

	
	

}
